<?php
namespace app\index\model;

use think\Model;

class TopicReply extends Model {
	public function user() {
		return $this->hasOne('User', 'id', 'uid')->field('id, username, fullname, avator_path, create_time, introduction');
	}

	public function topic() {
		return $this->hasOne('Topic', 'id', 'tid')->field('id, title');
	}

	public function getCreateTimeAttr($time) {
	    return $time;
	}
}